package org.jeecg.modules.geo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
 * @Description: bim_geo_api
 * @Author: jeecg-boot
 * @Date: 2022-12-05
 * @Version: V1.0
 */
@Data
@TableName("bim_geo_api")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "bim_geo_api对象", description = "bim_geo_api")
public class BimGeoApi implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "id")
    private Integer id;
    /**
     * 应用id
     */
    @Excel(name = "应用", width = 15, dicCode = "id", dictTable = "bim_geo_app", dicText = "app_name")
    @ApiModelProperty(value = "应用id")
    private Integer appId;

    /**
     * api路径
     */
    @Excel(name = "api路径", width = 15)
    @ApiModelProperty(value = "api路径")
    @NotBlank
    private String path;

    /**
     * api类型，1上报数据，2获取数据
     */
    @Excel(name = "api类型", width = 15, dicCode = "GEO_API_TYPE")
    @Dict(dicCode = "GEO_API_TYPE")
    @ApiModelProperty(value = "api类型，1上报数据，2获取数据")
    private Integer type;

    @Excel(name = "请求方法", width = 15, dicCode = "GEO_REQUEST_METHOD")
    @ApiModelProperty(value = "请求方法")
    @Dict(dicCode = "GEO_REQUEST_METHOD")
    private Integer apiMethod;

    @Excel(name = "dataMethod", width = 15, dicCode = "GEO_REQUEST_DATA_METHOD")
    @ApiModelProperty(value = "数据传输方式")
    @Dict(dicCode = "GEO_REQUEST_DATA_METHOD")
    private Integer dataMethod;

    /**
     * contentType
     */
    @Excel(name = "contentType", width = 15)
    @ApiModelProperty(value = "contentType")
    private String contentType;

    /**
     * 业务类型
     */
    @Excel(name = "业务类型", width = 15)
    @ApiModelProperty(value = "业务类型")
    private String businessType;

    /**
     * 接口数据类型
     */
    @Excel(name = "接口数据类型", width = 15)
    @ApiModelProperty(value = "接口数据类型")
    private String dataTypes;

    /**
     * 启用(1:是,0:否)
     */
    @Excel(name = "是否启用", width = 15, dicCode = "ENABLE_FLAG")
    @ApiModelProperty(value = "启用(1:是,0:否)")
    @Dict(dicCode = "ENABLE_FLAG")
    private Integer enableFlag;

    /**
     * 删除(1:是,0:否)
     */
    @ApiModelProperty(value = "删除标志(0-正常,1-已删除)")
    @TableLogic(value = "0", delval = "1")
    @Dict(dicCode = "del_flag")
    private Integer delFlag;

    /**
     * 描述
     */
    @Excel(name = "描述", width = 15)
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 创建者人员ID
     */
    @ApiModelProperty(value = "创建者人员ID")
    private String createUser;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新人员ID
     */
    @ApiModelProperty(value = "更新人员ID")
    private String updateUser;

    /**
     * 更新时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


    @TableField(exist = false)
    @ApiModelProperty(value = "应用名称")
    private String appName;

}
